<h1>New criteria</h1> <a href="#help" rel="facebox">Help me with this feature!</a>

<%= error_messages_for :criteria %>

<% form_for(@criteria) do |f| %>
  <p>
    <b>Name</b><br />
    <%= f.text_field :name %>
  </p>

  <p>
    <b>Match</b><br />
    <%= f.text_area :match %>
  </p>

  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', criterias_path %>

<div id="help">
  <h2>Here's some relief!</h2>
  
  <p>This page allows you to create criteria which can be added to rooms.  Here, you give it a <b>name</b> which is the name listed on the new room page, along with a <b>match</b> string.</p>
  
  <h3>More help with the <em>match</em> string</h3>
  
  <p>The <b>match</b> string is executed against the person that is being searched on in order to find available rooms for that person.  An example is <em>age &lt; 12<em>.  The accepted attributes (the first element) are:
    
    <ul>
      <li>age</li>
      <li>sex</li>
      <li>children</li>
      <li>addiction</li>
      <li>veteran</li>
      <li>hiv_aids</li>
    <ul>
</div>